package com.amigo.online.provider.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.amigo.online.common.base.service.BaseService;
import com.amigo.online.provider.manager.mapper.StartupImagesMapper;
import com.amigo.online.provider.manager.model.entity.StartupImages;
import com.amigo.online.provider.manager.service.StartupImagesService;
import com.amigo.online.provider.manager.util.TimestampUtil;

@Service
public class StartupImagesServiceImpl extends BaseService<StartupImages> implements StartupImagesService {

    @Resource
    private StartupImagesMapper startupImagesMapper;

    @Override
    public List<StartupImages> findStartupImagesList(StartupImages stiges) {

        TimestampUtil.setQueryTime(stiges);
        return startupImagesMapper.findStartupImagesList(stiges);
    }

    @Override
    public boolean insertionStartupImages(StartupImages stiges) {
        stiges.setUpdatedTime(stiges.getCreatedTime());
        if (startupImagesMapper.insertionStartupImages(stiges) <= 0) {
            return false;
        } else {
            return true;
        }


    }

    @Override
    public boolean updateStartupImages(StartupImages stiges) {

        if (startupImagesMapper.updateStartupImages(stiges) <= 0) {
            return false;
        } else {
            return true;
        }


    }

    @Override
    public boolean deleteStartupImages(StartupImages stiges) {
        if (startupImagesMapper.deleteStartupImages(stiges) <= 0) {
            return false;
        } else {
            return true;
        }


    }

}
